package com.vhall.component.entity.pendant.enums;

import com.vhall.component.entity.dictionary.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author shimingming
 * @since 2023/6/1 19:23
 */
@Getter
@AllArgsConstructor
public enum PushScreenFlagEnums implements BaseEnum {

    PUSH_SCREEN(0, "推屏"),
    PUSH_SCREENING(1, "推屏中"),
    ;

    private Integer value;

    private String name;

    public static String getName(Integer value) {
        for (PushScreenFlagEnums template : PushScreenFlagEnums.values()) {
            if (template.getValue().equals(value)) {
                return template.name;
            }
        }
        return null;
    }

    public static PushScreenFlagEnums parse(Integer value) {
        for (PushScreenFlagEnums type : PushScreenFlagEnums.values()) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }

}
